package com.javasea.patterns.mario.state;

import com.javasea.patterns.mario.MarioStateContext;

/**
 *@ClassName CapeMario
 *@Description TODO
 *@Author longxiaonan@163.com
 *@Date 2022/4/28 0028 22:33
 */
public class CapeMario extends AbstractMario{

    private static CapeMario intance = new CapeMario();

    private CapeMario() {
    }

    @Override
    public State getName(){
        return State.CAPE;
    }

    public static CapeMario getInstance(){
        return intance;
    }

    @Override
    public void meetMonster(MarioStateContext stateMachine) {
        stateMachine.setCurrentState(SmallMario.getInstance());
        stateMachine.setScore(stateMachine.getScore() - 200);
    }




}
